home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / scimagestructs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-11-22  |  2.7 KB  |  150 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef SCIMAGESTRUCTS_H
  8. #define SCIMAGESTRUCTS_H
  9.  
  10. #include <QImage>
  11. #include <QList>
  12. #include <QMap>
  13. #include <QString>
  14.  
  15. #include "fpointarray.h"
  16. #include "sccolor.h"
  17.  
  18. struct ImageLoadRequest
  19. {
  20.     bool visible;
  21.     bool useMask;
  22.     ushort opacity;
  23.     QString blend;
  24.     bool operator==(const ImageLoadRequest &rhs) const
  25.     {
  26.         return visible == rhs.visible && useMask == rhs.useMask && opacity == rhs.opacity && blend == rhs.blend;
  27.     }
  28. };
  29.  
  30. struct ImageEffect
  31. {
  32.     int effectCode;
  33.     QString effectParameters;
  34. };
  35. typedef QList<ImageEffect> ScImageEffectList;
  36.  
  37. struct PSDHeader
  38. {
  39.     uint signature;
  40.     ushort version;
  41.     uchar reserved[6];
  42.     ushort channel_count;
  43.     uint height;
  44.     uint width;
  45.     ushort depth;
  46.     ushort color_mode;
  47. };
  48.  
  49. struct PSDLayer
  50. {
  51.     QList<uint> channelLen;
  52.     QList<int> channelType;
  53.     int xpos;
  54.     int ypos;
  55.     int width;
  56.     int height;
  57.     ushort opacity;
  58.     uchar clipping;
  59.     uchar flags;
  60.     int maskXpos;
  61.     int maskYpos;
  62.     int maskWidth;
  63.     int maskHeight;
  64.     QString layerName;
  65.     QString blend;
  66.     QImage thumb;
  67.     QImage thumb_mask;
  68. };
  69.  
  70. struct PSDDuotone_Color
  71. {
  72.     QString Name;
  73.     ScColor Color;
  74.     FPointArray Curve;
  75. };
  76.  
  77. class ExifValues
  78. {
  79. public:
  80.     ExifValues(void);
  81.     void init(void);
  82.  
  83.     int width;
  84.     int height;
  85.     float ExposureTime;
  86.     float ApertureFNumber;
  87.     int   ISOequivalent;
  88.     QString cameraName;
  89.     QString cameraVendor;
  90.     QString comment;
  91.     QString userComment;
  92.     QString artist;
  93.     QString copyright;
  94.     QString dateTime;
  95.     QImage thumbnail;
  96. };
  97.  
  98. typedef enum
  99. {
  100.     ImageTypeJPG = 0,
  101.     ImageTypeTIF = 1,
  102.     ImageTypePSD = 2,
  103.     ImageTypeEPS = 3,
  104.     ImageTypePDF = 4,
  105.     ImageTypeJPG2K = 5,
  106.     ImageTypeOther = 6,
  107.     ImageType7 = 7
  108. } ImageTypeEnum;
  109.  
  110. typedef enum
  111. {
  112.     ColorSpaceRGB  = 0,
  113.     ColorSpaceCMYK = 1,
  114.     ColorSpaceGray = 2,
  115.     ColorSpaceDuotone = 3
  116. } ColorSpaceEnum;
  117.  
  118. class ImageInfoRecord
  119. {
  120. public:
  121.     ImageInfoRecord(void);
  122.     void init(void);
  123.  
  124.     ImageTypeEnum type;            /* 0 = jpg, 1 = tiff, 2 = psd, 3 = eps/ps, 4 = pdf, 5 = jpg2000, 6 = other */
  125.     int  xres;
  126.     int  yres;
  127.     int  BBoxX;
  128.     int  BBoxH;
  129.     ColorSpaceEnum colorspace; /* 0 = RGB  1 = CMYK  2 = Grayscale 3 = Duotone */
  130.     bool valid;
  131.     bool isRequest;
  132.     bool progressive;
  133.     bool isEmbedded;
  134.     bool exifDataValid;
  135.     int  lowResType; /* 0 = full Resolution, 1 = 72 dpi, 2 = 36 dpi */
  136.     double lowResScale;
  137.     int numberOfPages;
  138.     int actualPageNumber;
  139.     QMap<QString, FPointArray> PDSpathData;
  140.     QMap<int, ImageLoadRequest> RequestProps;
  141.     QString clipPath;
  142.     QString usedPath;
  143.     QString profileName;
  144.     QList<PSDLayer> layerInfo;
  145.     QList<PSDDuotone_Color> duotoneColors;
  146.     ExifValues exifInfo;
  147. };
  148.  
  149. #endif
  150.